
<template>
  <div>
    <el-card shadow="never">
      <div slot="header" class="clearfix" >
        <span>账户信息</span>
      </div>
      <el-descriptions title="">
        <el-descriptions-item label="可用余额">100.00</el-descriptions-item>
        <el-descriptions-item label="待结算余额">0.00</el-descriptions-item>
        <el-descriptions-item label="方式">100.00</el-descriptions-item>
        <el-descriptions-item label="单笔最低提现">100.00</el-descriptions-item>
        <el-descriptions-item label="单笔最高提现">100.00</el-descriptions-item>
      </el-descriptions>
    </el-card>
    <div class="table-layout">
      <el-card shadow="never">
        <div class="table-handle">
          <el-upload>
            <el-button type="primary" icon="el-icon-upload">导入Excel</el-button>
          </el-upload>
          <div style="flex-grow: 1;display: flex;align-items: center;justify-content: flex-end">
            <el-button type="danger" icon="el-icon-download" @click="onDownloadTemplate">下载模版</el-button>
            <el-button type="primary" icon="el-icon-download" @click="onBatchSubmit">批量提交</el-button>
          </div>
        </div>
        <div class="table-box">
          <el-table
              size="large"
              stripe
              border
              v-loading="loading"
              max-height="420px"
              :data="tableData"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(255, 255, 255, 0.8)"
              @selection-change="onSelect"
          >
            <el-table-column type="selection"></el-table-column>
            <el-table-column show-overflow-tooltip align="center" v-for="item in columns" :key="item.prop" :prop="item.prop" :label="item.label">
              <template slot-scope="scope">
                <template v-if="item.type === 'select'">
                  <el-tag :type="item.tagType" v-if="item.isTag">{{ item.mapping[scope.row[item.prop]] }}</el-tag>
                  <span v-else>{{ item.mapping[scope.row[item.prop]] }}</span>
                </template>
                <span v-else>{{ scope.row[item.prop] }}</span>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="page-box">
          <el-pagination
              background
              :current-page="pageNo"
              :page-sizes="pageSizes"
              :page-size="pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="totalSize"
              @size-change="changePageSize"
              @current-change="changePageNo"
          />
        </div>
      </el-card>
    </div>
  </div>
</template>
<script>

import crud from "@/mixins/crud";

export default {
  name: "index",
  mixins: [crud],
  data() {
    return {
      columns: [
          // 姓名、银行卡号、银行名称、金额、IFSC
          { prop: "nickname", label: "姓名" },
          { prop: "bankCard", label: "银行卡号" },
          { prop: "bankName", label: "银行名称" },
          { prop: "amount", label: "金额" },
          { prop: "ifsc", label: "IFSC" }
      ],
      tableData: [
      ]
    }
  },
  methods: {
    onDownloadTemplate() {},
    onBatchSubmit() {}
  }
}
</script>

<style scoped lang="scss">

</style>
